* {
    padding: 0;
    margin: 0;
    font-size: 0;
}

.wrapper {
    position: relative;
    transform-style: preserve-3d;
    perspective: 800px;
    height: 200px;
    margin-top: 200px;
}

.wrapper img {
    position: absolute;
    width: 300px;
    height: 200px;
    left: 50%;
    top: 50%;
    margin-left: -150px;
    margin-top: -100px;
    border-radius: 8px;
    transition: transform 0.8s ease-in-out;
}